<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>bootstrap datatable demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">




<link rel="stylesheet" type="text/css"
	href="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/bootstrap-responsiv.css">


<link rel="stylesheet" type="text/css"
	href="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/dataTables.bootstra.css">
</head>

<body>

	<div class="container-fluid">
		<div class="row-fluid">

			<div>
				<ul class="breadcrumb">
					<li>我的缴费记录 <span class="divider">></span>
					</li>
					<li>我的缴费信息 </li>
				</ul>
			</div>
		</div>
		<div class="row-fluid">

			<table
				class="table table-striped table-bordered table-hover datatable">
				<thead>
					<tr>
						<c:set value="${fn:split(pageModel.th_list,',') }" var="ths"></c:set>
						<c:forEach items="${ths }" var="th">
							<th>${th }</th>
						</c:forEach>
					</tr>
				</thead>
				<tbody>
					<!-- 数据信息 -->
					<c:forEach items="${list}" var="tds" varStatus="status">
						<tr class="odd gradeX">
							<td>${status.index + 1}</td>
							<td>
								<c:if test="${tds.cType==1 }">
									水费
								</c:if>
								<c:if test="${tds.cType==2 }">
									电费
								</c:if>
								<c:if test="${tds.cType==3 }">
									燃气费
								</c:if>
								<c:if test="${tds.cType==4 }">
									宽带费
								</c:if>
								<c:if test="${tds.cType==5 }">
									物业管理费
								</c:if>							
							</td>
							<td>${tds.price.pPrice }</td>
							<td>
							<c:if test="${tds.cStatus==0 }">
								<font color="red">未缴费</font>
							</c:if>
							<c:if test="${tds.cStatus==1 }">
								<font color="green">已缴费</font>
							</c:if>
							<c:if test="${tds.cStatus==2 }">
								<font color="black">待审核</font>
							</c:if>
							</td>
							<td width="20%">
							<c:if test="${tds.cStatus==0 }">
								--------------
							</c:if>
							<c:if test="${tds.cStatus==2 }">
								--------------
							</c:if>
							<c:if test="${tds.cStatus==1 }">
								<fmt:formatDate value="${tds.cTime }"
									pattern="yyyy-MM-dd HH:mm:ss" />
							</c:if>	
							</td>						
							<td >${tds.cRemark }</td>
							<td >
							<c:if test="${tds.cStatus==0 }">
										<a href="<%=path %>/rest/charge/conmitCharge?cid=${ tds.cId}">确认缴费</a>
							</c:if>					
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/jquery.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/jquery.dataTables.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/bootstrap.min.js"></script>
		<script type="text/javascript"
			src="http://sandbox.runjs.cn/uploads/rs/238/n8vhm36h/dataTables.bootstrap.js"></script>
	</div>
	<script type="text/javascript">
		$(document).ready(function() {
    			$('.datatable').dataTable( {        				
        				"oLanguage": {
								"sUrl": "<%=path%>/json/zh_CN.json"
				}
			});
		});
	</script>
</body>

</html>
